<!-- WEB CONTENT -->
<div id="container_content">
    <div id="ad_main_name">
        <?php
            if($_GET['at'] !== 'd') {
               echo '<h2>Register User</h2>
                <div id="register_dealer_extra_button" class="red">
                    <a href="?p=register&at=d">Register Dealer Here</a>
                </div>';
            }
        else {
            echo '<h2>Register Dealer</h2>
                <div id="register_dealer_extra_button" class="red">
                    <a href="?p=register">Register User Here</a>
                </div>';
        }
        ?>
    </div>
    <div id="registering_user">
        <form action="" method="POST" enctype="multipart/form-data">
            <div class="register_user_inputs_holder">
                <ul>
                    <li>
                        <h2>Email*</h2>
                        <label for="email"></label><input type="text" name="email" id="email" value="<?php echo $data->user_data['email']; ?>" />
                    <li class="bigger_password">
                        <h2>Enter Password*</h2>
                        <label for="pass1"></label><input type="password" name="pass1" id="pass1"/>
                    <li class="bigger_password">
                        <h2>Repeat Password*</h2>
                        <label for="pass2"></label><input type="password" name="pass2" id="pass2"/>
                </ul>
            </div>
            <div class="register_user_inputs_holder">
                <ul>
                    <li>
                        <h2><?php echo ($_GET['at'] === 'd' ? 'Company name*' : 'Username*')?></h2>
                        <label for="username"></label><input type="text" name="username" id="username" value="<?php echo $data->user_data['username']; ?>" />
                    <li>
                        <h2>First Name*</h2>
                        <label for="first_name"></label><input type="text" name="first_name" id="first_name" value="<?php echo $data->user_data['first_name']; ?>" />
                    <li>
                        <h2>Surname*</h2>
                        <label for="surname"></label><input type="text" name="surname" id="surname" value="<?php echo $data->user_data['surname']; ?>" />
                </ul>
            </div>
            <div class="register_user_inputs_holder">
                <ul>
                    <li>
                        <h2>Contact Phone*</h2>
                        <label for="phone"></label><input type="text" name="phone" id="phone" value="<?php echo $data->user_data['phone']; ?>" />
                    <li>
                        <h2>City*</h2>
                        <label for="city"></label><input type="text" name="city" id="city" value="<?php echo $data->user_data['city']; ?>" />
                    <li>
                        <h2>Postcode</h2>
                        <label for="postal_code"></label><input type="text" name="postal_code" id="postal_code" value="<?php echo $data->user_data['postal_code']; ?>" />
                        <input type="hidden" name="account_type" value="<?php echo ($_GET['at'] === 'd' ? 'dealer' : 'member'); ?>"/>
                </ul>
            </div>
            <div class="register_user_inputs_holder">
                <ul>
                    <li>
                        <h2>State*</h2>
                        <div class="styling_select">
                            <label for="state"></label>
                            <select name="state" id="state">
                                <option value="">-- select --</option>
                                <?php
                                foreach ($data->lists['states'] as $v) {
                                    if($v == $data->user_data['state']) {
                                        echo "<option value='".$v."' selected>${v}</option>";
                                    } else {
                                        echo "<option value='".$v."'>${v}</option>";
                                    }
                                }
                                ?>
                            </select>
                        </div>
                    </li>

                    <?php
                        //company logo only for dealers
                        if($_GET['at'] === 'd') {
                    ?>
                    <li>
                        <h2>Upload Company Logo</h2>
                        <div id="style_dealer_image_upload">
                            <input type="file" name="company_logo" id="company_logo" />
                        </div>
                    </li>

                    <?php
                        }
                    ?>

                </ul>
            </div>
            
            <div id="submit_advartise">
    <ul>
                            <li><label for="tac"></label><input type="checkbox" name="tac" id="tac" value="1"></li>
                            <li>
                                <p>
                                    I agree to the <span>Advertiser Terms & Conditions</span>
                                </p>
                            </li>
                        </ul>
      <input type="image" src="img/register_button.png" style="float:right; margin-right:54px;" value="Register!" name="submit"/>
    </div>
        
        </form>
    </div>
     <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
        <br/>
</div>